package com.song.shop.nio;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * @author Song Yinghui
 * @date 2019/2/13
 * @Version 1.0
 */
public class SocketServer {
    public static void main(String[] args) {

        try {
            ServerSocket serverSocket = new ServerSocket(8888);
            while (true) {
                Socket accept = serverSocket.accept();
                new ThreadServerUtils(accept).start();
            }
        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}
